

package com.kimo.shop.user.comment.service;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kimo.shop.bean.model.User;
import com.kimo.shop.bean.param.UserUpdateParam;
import com.kimo.shop.user.comment.dto.UserTagDto;
import com.kimo.shop.user.comment.model.UserTag;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * 客户标签
 *
 * @author kimo-taozhouchuan
 * @date 2020-09-09 11:31:16
 */
public interface UserTagService extends IService<UserTag> {

    boolean addUserTag(UserTagDto userTagDto);

    boolean updateUserTag(UserTagDto userTagDto);

    boolean removeUserTag(Long userTagId);

    /**
     * 填充自定义可选条件
     */
    void fillInCustomOptionalCondition(UserTagDto userTagDto, UserTag userTag, UpdateWrapper<UserTag> updateWrapper);

    /**
     * 刷新条件标签统计人数
     */
    UserTag refreshConditionTag(Long userTagId);

    /**
     * 根据"最近几天"求出具体日期
     */
    Date addDateTimeCondition(Integer timeType, LocalDateTime localDateTime);

    /**
     * 求两个List<User>之间的交集
     */
    List<User> userFilter(List<User> users1, List<User> users2);

    void sendTagMsg(Long templateId);

    /**
     * 批量修改用户标签
     */
    Boolean batchUpdateUserTag(UserUpdateParam param);
}
